Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: JManager Reference /
Chapter 1 - JManager Reference / JManager Constants and Data Types


Applet Callbacks Structure

When you instantiate an applet using the JMNewAppletViewer function, you must pass a data structure that supplies callback information for the applet. This data structure is defined by the JMAppletViewerCallbacks data type.

struct JMAppletViewerCallbacks {
   UInt32            fVersion;   
   JMShowDocumentProcPtr fShowDocument;
   JMSetStatusMsgProcPtr fSetStatusMsg;
};
Field Description
fVersion
The version of JManager. You should set this field to kJMVersion.
fShowDocument
A pointer to a function that displays the contents of a URL passed to it, possibly in a new window. This callback function has the following type definition:
               typedef void (*JMShowDocumentProcPtr) (
                  JMAppletViewerRef viewer, const char* urlString, 
                  Boolean inNewWindow);
For more information, see the description of the application-defined function MyShowDocument (page 68).
fSetStatusMsg
A pointer to a function that handles messages from the applet. The client application can display the message (in a status bar, for example) or ignore it. This callback function has the following type definition:
               typedef void (*JMSetStatusMsgProcPtr) (
                  JMAppletViewerRef viewer, const char* statusMsg);
For more information, see the description of the application-defined function MySetStatusMsg (page 69).

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 DEC 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help